<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>xmpp.debug.Debug</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="xmpp-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="xmpp-module.html">Package&nbsp;xmpp</a> ::
        <a href="xmpp.debug-module.html">Module&nbsp;debug</a> ::
        Class&nbsp;Debug
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="xmpp.debug.Debug-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Debug</h1><span class="codelink"><a href="xmpp.debug-pysrc.html#Debug">source&nbsp;code</a></span><br /><br />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">active_flags</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">log_file</span>=<span class="summary-sig-default">sys.stderr</span>,
        <span class="summary-sig-arg">prefix</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">DEBUG: </code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">sufix</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">\n</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">time_stamp</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">flag_show</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">validate_flags</span>=<span class="summary-sig-default">1</span>,
        <span class="summary-sig-arg">welcome</span>=<span class="summary-sig-default">-1</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="xmpp.debug-pysrc.html#Debug.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="xmpp.debug.Debug-class.html#show" class="summary-sig-name">show</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">msg</span>,
        <span class="summary-sig-arg">flag</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">prefix</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">sufix</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">lf</span>=<span class="summary-sig-default">0</span>)</span><br />
      flag can be of folowing types:...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="xmpp.debug-pysrc.html#Debug.show">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="active_set"></a><span class="summary-sig-name">active_set</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">active_flags</span>=<span class="summary-sig-default">None</span>)</span><br />
      returns 1 if any flags where actually set, otherwise 0.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="xmpp.debug-pysrc.html#Debug.active_set">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="active_get"></a><span class="summary-sig-name">active_get</span>(<span class="summary-sig-arg">self</span>)</span><br />
      returns currently active flags.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="xmpp.debug-pysrc.html#Debug.active_get">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="xmpp.debug.Debug-class.html#_as_one_list" class="summary-sig-name">_as_one_list</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">items</span>)</span><br />
      init param might contain nested lists, typically from group 
      flags.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="xmpp.debug-pysrc.html#Debug._as_one_list">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_append_unique_str"></a><span class="summary-sig-name">_append_unique_str</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">lst</span>,
        <span class="summary-sig-arg">item</span>)</span><br />
      filter out any dupes.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="xmpp.debug-pysrc.html#Debug._append_unique_str">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_validate_flag"></a><span class="summary-sig-name">_validate_flag</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">flags</span>)</span><br />
      verify that flag is defined.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="xmpp.debug-pysrc.html#Debug._validate_flag">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_remove_dupe_flags"></a><span class="summary-sig-name">_remove_dupe_flags</span>(<span class="summary-sig-arg">self</span>)</span><br />
      if multiple instances of Debug is used in same app, some flags 
      might be created multiple time, filter out dupes</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="xmpp.debug-pysrc.html#Debug._remove_dupe_flags">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="Show"></a><span class="summary-sig-name">Show</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">flag</span>,
        <span class="summary-sig-arg">msg</span>,
        <span class="summary-sig-arg">prefix</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="xmpp.debug-pysrc.html#Debug.Show">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="is_active"></a><span class="summary-sig-name">is_active</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">flag</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="xmpp.debug-pysrc.html#Debug.is_active">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="xmpp.debug.Debug-class.html#colors" class="summary-name">colors</a> = <code title="{'CONNECTproxy': '\x1b[30;1m',
 'auth': '\x1b[33;1m',
 'browser': '\x1b[34m',
 'client': '\x1b[36m',
 'component': '\x1b[36m',
 'data': '\x1b[33m',
 'dispatcher': '\x1b[32m',
 'down': '\x1b[33m',
..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">CONNECTproxy</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x1b[30;1m</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">auth</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x1b[33;1m</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="show"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">show</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">msg</span>,
        <span class="sig-arg">flag</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">prefix</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">sufix</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">lf</span>=<span class="sig-default">0</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="xmpp.debug-pysrc.html#Debug.show">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <pre class="literalblock">

flag can be of folowing types:
    None - this msg will always be shown if any debugging is on
    flag - will be shown if flag is active
    (flag1,flag2,,,) - will be shown if any of the given flags 
                       are active

if prefix / sufix are not given, default ones from init will be used

lf = -1 means strip linefeed if pressent
lf = 1 means add linefeed if not pressent

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_as_one_list"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_as_one_list</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">items</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="xmpp.debug-pysrc.html#Debug._as_one_list">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>init param might contain nested lists, typically from group flags.</p>
  This code organises lst and remves dupes
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="colors"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">colors</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">CONNECTproxy</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x1b[30;1m</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">auth</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x1b[33;1m</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">browser</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x1b[34m</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">client</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x1b[36m</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">component</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x1b[36m</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">data</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x1b[33m</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">dispatcher</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x1b[32m</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">down</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x1b[33m</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="xmpp-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Sat Dec 15 22:25:14 2007
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
